<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>

</body>

</html>
<script>
    const data = ["10,689,025", "99,723", "100", "11,000"]

    // 先去掉分隔符，然后进行一个有小到大的排序
    function moneyDelete(data) {
        for (var i = 0; i < data.length; i++) {
            console.log(data[i])
            if (data != undefined && data != null) {
                let _data = data;
                _data = _data.toString();
                _data = _data.replace(/,/gi, '');
                return _data
            } else {
                return data;
            }
        }
    }
    let a = moneyDelete(data)
    console.log(a)
    var temp;
    for (i = 0; i < data.length / 2; i++) {
        temp = data[i];
        data[i] = data[data.length - 1 - i];
        data[data.length - 1 - i] = temp;
    }
    console.log(data);



    function sortString(list) {
        return data.toLocaleString();
    }

    alert(sortString(this.data));
</script>
<style>

</style>